<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
        'action'=>Yii::app()->createUrl('/blog/createImage'),
	'id'=>'blog-image-form',
	'enableAjaxValidation'=>false,
        'htmlOptions' => array('enctype' => 'multipart/form-data'),
)); ?>

	<?php echo $form->errorSummary($model); ?>

	<div class="row">
		<?php echo $form->labelEx($model,'image'); ?>
                <?php echo CHtml::activeFileField($model, 'image'); ?>
		<?php echo $form->error($model,'image'); ?>
	</div>

	<div class="row">
		<?php
                echo $form->hiddenField($model,'blog');
                ?>
	</div>

	<div class="row buttons">
		<?php echo CHtml::submitButton('Create'); ?>
                <?php echo CHtml::button('Cancel',array('id'=>'close_blog_image_box_btn')); ?>
	</div>

<?php $this->endWidget(); ?>

</div><!-- form -->